package models.ru.paralainer.chat.server.dao;

/**
 * @param <T> entity type
 *  Only works with entities with id of type Long
 */
public interface GenericDAO<T> {

    T findById(Long id, boolean lock);

    T findById(Long id);

    T save(T entity);

    void delete(T entity);
}
